class AdminController < ApplicationController
  # This is a secure controller wfrom which all admin controllers should be derived.

  before_filter :is_admin
  
  def access_denied
    respond_to do |accepts|
      accepts.html do
        store_location
        redirect_to :controller => '/account', :action => 'no_access'
      end
      accepts.xml do
        headers["Status"] = "Unauthorized"
        headers["WWW-Authenticate"] = %(Basic realm="Web Password")
        render :text => "Could not authenticate you.", :status => "401 Unauthorized"
      end
    end
    false
  end

end
